package com.lin.cloud.disk.manage;

import com.lin.cloud.disk.entity.pojo.Directory;
import com.lin.cloud.disk.entity.request.directory.*;
import com.lin.cloud.disk.entity.response.GetSpecifiedDayWithinFileAndDirectoryByDeleteResponse;
import com.lin.cloud.disk.entity.response.GetCurrentDirectoryAndFileListResponse;

import java.util.List;

/** 目录结构管理服务
 * @author ljc
 * @date 2020/12/30 22:09
 */
public interface IDirectoryManageService {


    /**
     * 创建目录
     * @param request
     */
    void createDirectory(CreateDirectoryRequest request);

    /**
     * 获取目录结构
     * @param request
     * @return
     */
    List<Directory> getDirectoryPath(GetDirectoryPathRequest request);

    /**
     * 修改目录名字
     * @param request
     */
    void updateDirectoryName(UpdateDirectoryNameRequest request);


    /**
     * 逻辑删除目录
     * @param request
     */
    void logicRemoveDirectory(RemoveDirectoryRequest request);

    /**
     * 物理删除目录
     * @param request
     */
    void physicistRemoveDirectory(RemoveDirectoryRequest request);

    /**
     * 逻辑恢复目录
     * @param request
     */
    void logicRestoreDirectory(RestoreDirectoryRequest request);

    /**
     * 移动目录
     * @param request
     */
    void moveDirectory(MoveDirectoryRequest request);


    /**
     * 获取当前目录下的文件与目录
     * @param request
     * @return
     */
    GetCurrentDirectoryAndFileListResponse getCurrentDirectoryAndFileList(GetCurrentDirectoryAndFileListRequest request);

    /**
     * 获取N天内的删除的文件与目录
     * @param request
     * @return
     */
    GetSpecifiedDayWithinFileAndDirectoryByDeleteResponse getSpecifiedDayWithinFileAndDirectoryByDelete(GetSpecifiedDayWithinFileAndDirectoryByDeleteRequest request);

    /**
     * 懒加载获取目录树
     * @param request
     * @return
     */
    List<Directory> getLazyDirectoryTree(GetLazyDirectoryTreeRequest request);
}
